<template>
  <div>
        <van-nav-bar
      title="精彩跟帖"
      left-text="返回"
      left-arrow
      @click-left="$router.back()"
    />
    <div>
      <CommentMain v-for="item in commentList" :key="item.id" :commentData="item"/>
    </div>
  </div>
</template>

<script>
import { getPostCommentById } from '@/api'
import CommentMain from '@/components/myframe/Main.vue'
export default {
  components:{
CommentMain
  },
  data () {
    return {
      commentList:[]
    }
  },
  mounted(){
     const{ id }=this.$route.params
     getPostCommentById(id).then((res)=>{
       this.commentList=res.data.data
     })
  }
}
</script>

<style>

</style>